home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 441 / dlibs12 / memchr.c < prev    next >
C/C++ Source or Header  |  1990-11-23  |  172b  |  12 lines

  1. #include <stddef.h>
  2.  
  3. char *memchr(buf, c, cnt)
  4.     register char *buf, c;
  5.     register int cnt;
  6.     {
  7.     while(cnt--)
  8.         if(*buf++ == c)
  9.             return(--buf);
  10.     return(NULL);
  11.     }
  12.